#include <stdio.h>
#include <stdlib.h>

int main(){
    char str[20],*ptr;
    sprintf(str,"%d",rand());
    printf("%lf\n%d\n%ld\n",atof(str),atoi(str),atol(str));
    sprintf(str,"%s,test",str);
    double a;
    a=strtod(str,&ptr);
    printf("%lf%s\n",a,ptr);
    long b;
    b=strtol(str,&ptr,10);
    printf("%ld%s\n",b,ptr);
    unsigned long c;
    c=strtoul(str,&ptr,10);
    printf("%ld%s\n",c,ptr);
    return 0;
}
